package com.situ.mymall.controller;


import com.situ.mymall.pojo.entity.OperLog;
import com.situ.mymall.pojo.query.OperLogQuery;
import com.situ.mymall.service.IOperLogService;
import com.situ.mymall.util.PageResult;
import com.situ.mymall.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//该类是给网页提供数据，除了添加不在这里写，剩下的都为给网页提供数据
@RestController
@RequestMapping("/operLog")
public class OperLogController {

    @Autowired
    private IOperLogService operLogService;

    //分页查询
    @RequestMapping("/list")
    public PageResult list(OperLogQuery operLogQuery){
        PageResult pageInfo = operLogService.list(operLogQuery);
        return pageInfo;
    }

    //详情信息
    @RequestMapping("/selectById")
    public Result selectById(Integer id){
        OperLog operLog = operLogService.selectById(id);
        return Result.ok(operLog);
    }
}
